added else to pad()