move get data to private method