closed #39 and '40; exists and setprod are already implemented.