bug fix and enhancement

fixed sorting. added image view to example.py