second edit of main