Modified eat function