added main method to py