resolve forward reference