removed debug prints and commented-out code