refactored to remove need for regisrear and improved food generation