possibly done with assignment 7, untested