simplified design, improved test