Super minor, and probably more of a preference either way, but you don't have to pass in db, you can just call get_db() in here, which would allow you to not have an extra line saving off db when you call this. Calling get_db multiple times isn't a performance hit because it stores off the db the first time and just returns the same instance. Again, you can just ignore this if you don't care haha.