An attempt to make the code more readable