updated header file to handle passing by reference