function for pawn