added do.log and max.points arguments