changes to improve the speed of cv_assem