fixed some spacing and order of closing