resolve labels and functions