rewrite if node and add test folder