solution achieved; all tests passing