fix for browser compat
fix for browser and nodejs compitibility
adding some documentation on how to use the library