backup of working gammaray.c file