new and improved version
InvokeSync works