Added example observer code to cmat