adding split function