local function getValue(env) local value = env.getRadiation() local stringValue = value.radiation .. value.unit return stringValue end local function watch() while true do sleep(0.05) -- Update every tenth second end end local function startUp() end local function shutdown() end local function report() local color = colors.black monitor.setBackgroundColor(color) setNewLine() monitor.write("Internal Radiation Level: " .. getValue(internalEnvironment)) setNewLine() monitor.write("External Radiation Level: " .. getValue(externalEnvironment)) end return { report = report, watch = watch, startUp = startUp, shutdown = shutdown }