implemented replace
rudimentary regex check