optimized convert code
Merge branch 'master' of github.com:goyalankit/regression