A version which can be merged to master
Formatted code