reorg and modifications after discussion with jiyan