removed dead code
use the right columns for the selects