added support for discount codes