cleaned up harr_transform