added generic function for toggling task properties