Added onHandleUp and onHandleDown functions