opening new version
finally some tests for the main function