complete the build function

miss build in BUILD parameter
add callback in function