bug fix in phi12 calc. atan2 instead of atan