better call updateType where you call toggle?