Add database to create function
Add notifications code