refactor
refactor
refactor
refactor
refactor
refactor defalut value calculation