using memoizable to store js