added back the old registration code. TODO: make sure the orientations are correct.