Added support for optional pad string