changed transformation chain to do in-memory transformation instead of creating temporary files