use instanceof insteed of constractor
Merge branch 'master' into gh-pages