deleted useless functions and changed a few variables names