add swap support