Add padWithZero function

(for cleaner code)