fixed to work with multiple models simultaneously