Changes done as per comments