added main for test purposes