changed preg_replace cos is not needed at this scope