added main code block