improve test to have it less dependent from external parmater and reuse
code