branching
some improvements