reorg again and init flask