added prepare_config