improve CodeClimate score by unifying the handlers