Copied code from week 2 for recent and all items objects