adds better errors and binding of caller