close #8, made better unit tests