Added accept function for treasure chest