Fixed function declaration.

Now uses the address of the variable instead of copying it