Made mark-as-completed function