made various changes as per docs