refactor, perforamnce, and readme update
Changed API