massive rewrite. broken del handler. too drunk to fix it