create the swap class