change params to not be pointers