changed tree panel to take an object of arguments