using mat file input