Adding changes as per asthan's comments.