added more list functions, dimension for matrices