add prototype for rindex1 and rindex2