fix write function,add get operation implementation