added str2arr function