recursively doing stuff