added throwing of exceptions in M and ClassMaster