small changes to make the code more clear and verbose