Small updates to pigeonholing function