replace toggle with native implementation