use instanceof insteed of constractor
Merge branch 'master' into tc