Added root param + small refactor