Updating the initial code