changed to use config instead of hardcoded url