modified feed function