add bunch of r codes solving stronghold problems