algorithm done,
output size has fall
try to optmize memory usage