Implemented #3 #2. Tests needed but waiting for test framework