Adding polar function.
Resolving errors in tests.