help func and utilites. tests