add in ajax functionality to edit treasures for captains