gustafn
committed
on 07 Sep
factor out common code to reduce redundancies