added Model.index() method to setup indexes