clean and improve rudp flow