renamed build function