add a Bytes() function to heartbeat and ScriptInput