add configure to specify the initial value of w