Added update functionality; all tests passing