pawn refactor