updated as per suggestions