wrote code main