Started adding handler routines

still needs testing