refactoring deprecated methods