minor changes required to the code