spec and bug fix to generate linear chains