added some more functions, only the polygon and sphere distances are tested though.