added animation when flagging