rewriting microscopejs and create npm package