updated to work with messageSurface