start of node js compatible lib