Added scratchpad, fixed AssertionError