added support for $ instead of %d