added pragma downcast