removed unnecessary functions and vars