Updated for working on Linux