UI Pushed

Rules encoding(Please double checked for correctness)
Default behaviour added code