made changes acc to Richard's feedback