created string to int array method