attaching handlers