add limits to config file and config is now a parameter