updated with handlers and embedded db