tests refactored and now pass