API changes to be compliant with esnext library
cleaned up