Edited for compatibility for Linux