Changed the API calls
Old API obsoletified