intermediate matlab work in progess