add fromRaw option