add another do concurrent to covariance
cleanup
cleanup
fix bug in cos_angle