why not check it after the if/else?