Modified for linux support