replaced c-style casts with c++ style in simulation library