add more unit tests and commonJS