Adapting functions include to new DB