adde Javascript version of lib