adding pi code