update directive
add controller, add layout to matrix object