reordered methods in index.js