updated pet feeding function