Added format method.

Fixes #5
Merge pull request #6 from firstandthird/feature/5-format-method

Added format method.