did some minor changes according to PEP008