Replaced Original code with Solution