changed param to be a pointer