Improve ROOT functions