attached callbacks to controller