complex polygon implementation