change this to be attached using the view events object