Formatter to avoid duplication in handlers