added main and boundary