the check here is sorta redundant as we only need it once down below, will tackle it in a separate pull.