removing extra buffering step from demarshalling