added main execution and tests