some adjustments to grab data from db