add build function for engine