implemented translate_phrase and also added case insensitivity to regex