Fixed adding assignment and made code closer to PEP 8