refactored option test