added some specs
improved exceptions