Fixed syntax error

fixed some syntax errors in my swapping methods