updated to work on linux