turned scratchpad into AMD module