removed swap and check functions from index.js
removed swap and check functions from index.js