add view option

add view option and fix the tests #13