implementation of transformRequest