added clear node function