getting rid of ereg and replacing with preg_replace