Wrote BaseRule class