refactored food generation and jsonp call