added support for twins
Automatic style corrections courtesy of autopep8