adding testing and fixing async processing