Added activeMode
Fully working