housekeeping
- remove unnecesarry padding block
- replace indexOf with match
- add 'g' to regex