updated processing functions