try [data] instead of Array(data) to avoid String#each calls