before height close loop