added a main method for illustration purposes