adding cache check