added code to detect pet while eating