better js data model