slightly changes to make the code more readable