removing typecasting warnings