add member functions and change global