changed error throwing