switched from substring to slice

switched from substring to slice, its minorly faster and takes up less space (when compressed + minified)

http://jsperf.com/slice-vs-substring/2