zero-routine when grains_count is zero.
added comments
merged from branch and added comments