few fixes
add unit tests for utils