major rewwork for beta2.0