added clear() to clear what is in the code array