use util method swap
fix bad doc format