in-memory quick stack implemetation