updated selection function
Merge branch 'gh-pages' of https://github.com/va3c/viewer into gh-pages