modified initialization interface, added rootSelector support