major reduction in code, by reducing repetition  event handles