add instanceof for #2