implemented more polygon functions