code refactor - set default value