pass1 and 2