tweaked script for linux