Add while cycle to work wuth string pointers