fixed closure bug; is functionally identical