infer more cases, we need to deal with forward declare issues explicitly