fixed spacing and midnight bug. serious refactoring needed