added smart cache