improved rawFormat