I don't think you should use "wg" prefix here, it suggest something is global, but it's not (you just assigned global variable to local variable).