added example, added chromosome length function