implemented algorithm import into database