Edited for formatting and PEP-8 style compliance