working loading directly from database