Understanding Threshold Switching in TaOx- based Selection Devices