Add discount function