updated delete query