improve regex use