small refactoring to extract a validReply method
moving config to root