improved padding

Issue #53