Enchance the algorithm running on nodejs server