I adjusted the code to use Ilya's setup for getting a current gusture.