wrote string split logic