macro for splitting