updated script to correctly pass options