making work for older versions of node
updating readme with example usage