scrap using zend directly, too many leaks/bugs