handlers: small refactor