add algorithm argument for association