added flagging functionality but not toggling between flag and unflag yet
flagging not working
flagging works after michael did a very stinky workaround
flagging and unflagging working correctly