modified script to run as non-root