removing unnecessary param passing
make regex check further down