split in utils.c
fix in split function and clean old code