factor out sequential processing functions