removed sample code and added function names