added crappy edit handler