added assert.throws