valgrind - ok
add tests
add tests