Finish processItem function