start to reorg classes, parameters for more flexibility