cleanup function names, remove unnesseary each loop when attatching event listeners