moved template call rule to separate class