small refactor for missing code block after conditional statement