can't these be default values instead of being set inside an else block?