updated snippets for swap and aslist