it's better to use instanceof