add some casts