Added pi algorithms