update function for foods