callback for quantity