remove 3rd code, add cache helper