Updates rules / Psudo code