Added PI function support