modified code using PEP rule