basic data structure of trival and lock-free version