Simplified the 'every' function in chapter 5