handle lenght mod and tests
cleanup