[pergola] cleaning interv function code