I added brackets. which indeed makes it a bit more clear. I also added docstring.