refactor germplasm query