added main functin