Revert "cleaned up code"

This reverts commit abc48041db984c4fe79154bc5d1f34a2bfce35fe.
Revert "Revert "cleaned up code""

This reverts commit ae8d398166d146a625c1564f11a40c5cde9c3f16.