added getOpt method
added new test method