adding instanceof type checker