adding functions and cleaning repository