Issue #9 fixed deprecated function