handle 2 pi correctly