add a class rules and add rules and remove rules method