fixing method deprecation call