added test for wei function'