added a main method to test that the code works