adapt matrix constructor
add examples