all function moved to utils.h and deleted unused files