fixed #25
also fixed some problems with formatting