fix policy and test, closes #39, #40