rewrite typecasting
add few typecasting