Modified code to the changes did before