completed solution / added reflection