use casts instead of type definitions