only modifies attribute hash, does not format (fixes #4).