update matrix construct functions

now it allows both 1 and 2 arguments