second pass to get input addresses