Updated the callback function to not have an unnecessary else statement.