changed recycle code back to simple stack based