Moved from smartDb