add swap example, more debugging bits