replaced console statement to assert.