another pawn refactor attempt