discount calculation wip