scratchpad code