core: make methods arguments types immutable
core: process complex condition in loop header