instead of having this transform function inline we could have it declared in some place close to where it is called