getting close to database layer