Used strings slice method instead of arrays'