improvement
added getOption function