fixes and tests for Shamir's