Modified for use on Linux