add casting to vectors
add integrator