hack up an edit function