added a main method to test basic functionality