eliminated white space and made logging better