Add an array, which will store the most recent 5 recent transactions. For the array, add an insert function which will store the specified transaction. You will need a index-counter which will keep track of the available index. If more than 5 are stored, it should loop around.