Test generation with argumenr
some more refactiring