code given by Hinal