changes to lineaging algorithm