updated to use config