added main method for testing