passing refactored tests