Modified code with same functionalities