replaced swap functions with stdlib swap. added example documentation comment