fxes typo in pad function