code to set done-ness