Adding spaces to improve tuple style
Extracting code in separate function