fixed functions and added listeners