tidy up code suit for PEP8