working version (transactional spout)