[Core] Using format (fixes #10).

Using format it's more sophisticated.