add static keyword to some functions