fixing md style and moving pi to math.pi