added support for message class in abstract classes