updated to have OS specific conditionals in bash