modified solution
modified solution