added define batter function