more database layer logic"