replacing database with graph object