corrected plus and minus button behavior with if statement