merged refactor grinder (forgott to commit before)
rebase