changing member variables to reference variables