added Array.prototype.swap