adding transition rules and unit tests