Change to how the code uses existing DB data - more testing needed