Modified to add mbstring