added main solution