fixed typo
removed use of depreciated method