add and update rat