changed the code to work on stuff other then libre office