Added support for padding