revised as per suggestions