fixed typo
group code for easier reading
add test for default option