refactoring, added padding wrapper bugfix