fixed model functions to adopt the online db