Working on treasure problem