added input padding functionality