wrore model and db_gateway interfaces