removed unnecessary rawImage allocation