added scaling and flip
Merge branch 'master' into gh-pages