modified sql and website to support ruid search