eliminate ans buffer
code cleanup
more