Adding pad function