code after adding region