first aproach to solve the split strings problem