replaced delegate() with on() and relocated to initialize()