Created if node and modified template

Todo: create group until end if