add paper algorithm