Added tester for main logic
first functional version 0.5