implemented most of data operations.