made class modifiers work with methods as well as attributes