moved event functions to controllers object