apply discount prototype