shortened function recursive