implement toggle api method