added code to limit quantity