clean code & swap