SuccessFully optimised the Code