fixed most of the deprecation warnings