Implemented swap command