dist for input groups and code, aka lazy david