better way to utilize ResponseFactory