split_by_prof function

Split by profile