Trying to adapt for Embedded database