add spec
refactor
fix to set default value to instance variable