corrected upcasting costs in prim