add set and get functions for data transfer.