Implemented some queries of last big for loop of neworder.script