added reverse goecoding