add calculate_W, calculate_Polar