first version of the listener, including a translation function