renamed Temp to Working and optimized limiting in graph_db