new code to test W@A function, in development still