add process and thread