added main test and output generation. next, i need to test all the functions