removed function and fixed regex