Still needs tweaks, but not a hack