new version of rawToProfile