Adding a swap class