improved indentation for swapping program