threads converted to async task