added ghor function