added rpg.c