[MOD]changed behaviour
[MOD]wrapped all code into namespace