coorected grammar  upto local scope