make the transform a bit more generic