Maybe it is possible to make the code more compact? Can you remove empty lines 14 and 20?