cache is now fully implemented; still needs testing