pulled out typecasting class