reorginized a bit