removes redundant buffer copies. closes #55