reorganize

easier buffer close