added main func