modified as Tapan wanted it