First version works (only tested on LibreOffice)