tweaks, including handling of seconds
rework algorithm to parameterize minTieLength