some fixes in format()
Merge pull request #6 from groessler/something_to_pull

some fixes in format()