Finished version of assn7