Added cache vector code (not part of assignment)