add some functions in dense matrix