added root argument to init function