Thanks a lot Megatron!
I never thought about using atoms, it's so easy.

Just one thing for anyone else that want to try this out:
Change the declaration in the functions from Integer into Long because they are unsigned and it just didn't work until I changed the declarations.

Thanks again Megatron!!!!