adapt the programme to both linux and windows