API v2
API v2 with small changes in modeChange method