added padWith function