added preg_split and return value passing