refactor defaults method