renamed *_matrix functions, fixed erroneous dct_extend_bc