Slight alteration to conditionals in function for new item