Grouping steps by similar differences