add casts to doc