changed the functions and added files