delete query as a class