[28] Tidied code for solution 28