Added PI calculation