rewrote to support multiple languages