added main function for test interface