use external config if available,
cleaned up helpers