select address logic