new version of this library with fixed deprecated function