Implement better pad solution, improvement on issue #1