refactoring jsPedigrees