corrected some dimensional problems