Added scratchpad code