added low-level database function