Adding pad functionality to resize