added swapin/out support to swap plugin