grains can be solved with free functions