works in pyramid. tests.