start processIncoming and add function declarations to fill in