begin refactor of model filtering