added more tables and columns, changed joins