added support for impersonation
removed many console.log