reverted back to previous commit as it is more versatile. fixed npm test.