why 2 asInstanceOf?