cleaning up scoping on sync calls