move dup blocks expander to new function