Modified version
Removed deprecated api calls