add config and refactored