split to subroutine