Changed passing of pointers