close #4 implemented; tests added