code revision suggestions for Ranger sample