grains fixes
more readable for human
prepare for testing
name error fix