add better errors and binding of caller