modified my string padding method