processing of single particle moved to the separate function