Updated version (should work on Linux)