cleaned up transformer a bit