make it work with current versions of node