fixed hardcoding of pi type