first draft of DB support