added Primitive to ByteArray method and fully implemented SimpleProtocol