On the mechanism of ovonic threshold switching