added new implementation of record gesture with threshold