Revised script to comply with PEP8