resolving deprication warning