updated type casts with type information