refactor import
graph -> table, updated api to support efficient queries