made tests pass and cleaned up deprecation warnings