added weird casts to embedded type