Set up to work recursively