add code closure rules