added initial decoder and rules