cleanup and use .delegate() for more efficiency