updated goodCode.R example code