updated script for linux