modify fuctions to be private