updated sol for revised problem