do away with validate_config() (thanks @jerith)
more DRY (thanks @jerith)