added basic regex logic