model refactored; toggling fixed