Added pi simulation