created check_quantity method to pull out id/else statement