Method and apparatus for data transmission