Assignment 10: did the semantics, passes provided tests. TODO: add properties