maybe move this at the end of `if ... else` block?