added test for percentage discount and corresponding working code
added a test for the functionality of an absolute discount (as opposed to percentage discount)
added functionality for absolute discount