implement event listening for quantity changes