added macro to split trees