refactor to cache todo