Added db reading
Added working implementation with DFS