added piecemessage
changed message type to byte length