why is instanceof still needed here ?