modify code for test