removed dies and replaced with exceptions.