update class manipulation methods to be more spec-friendly