refactored to remove deprecated methods