adding threading to analysis