add Option.
add test and fix bugs