refactored to synchronous execution for now as async caused problems