made some functions static.