vectorized prior computation implemented