reducing more db queries but not sure if this is actually better programming