trying to dynamically calculate the correct indexes for the module and model