more UTs work in progress
adding some tests fixing loop