complete solution added reflection