Made changes as per comments