updated insert() to store values, added swap function
Merge origin/master