flatten arguments of STDEVA and add tests for it