Update build function.