Add functions to cast stores to a model