improved full test
some utils and refactoring