moved configuration validation to its own method