Added build cycle logic