added blockcopy support
improved segment handling