modify to work on linux