todo: print split, write settings to config file. handle ctrl+d infinite loop